﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SGC_CarteraClientes.Models
{
    public class ClsMensaje
    {

        private string g_TipMsg {get ; set ;}
        private string g_DesMsg { get; set; }

        public ClsMensaje() { }

        public string getHtmlMsg(string pTipMsg, string pDesMsg) {
            this.g_TipMsg = pTipMsg;
            this.g_DesMsg = pDesMsg;
            return this.g_htmlMsg;
        }

        private string g_htmlMsg {
            get {
                string l_htmlCode = "";
                if (this.g_TipMsg == "E") { 
                    l_htmlCode = "<div class='isa_error'>" +
                       "<i class='fa fa-times-circle'></i>"+
                       this.g_DesMsg +
                    "</div>";
                }
                else if (this.g_TipMsg == "S")
                {
                    l_htmlCode = "<div class='isa_success'>" +
                       "<i class='fa fa-check'></i>" +
                       this.g_DesMsg +
                    "</div>";
                }
                else if (this.g_TipMsg == "I")
                {
                    l_htmlCode = "<div class='isa_info'>" +
                       "<i class='fa fa-info-circle'></i>" +
                       this.g_DesMsg +
                    "</div>";
                }
                else if (this.g_TipMsg == "W")
                {
                    l_htmlCode = "<div class='isa_warning'>" +
                       "<i class='fa fa-warning'></i>" +
                       this.g_DesMsg +
                    "</div>";
                }
                return l_htmlCode;
            }
        }
       
    }
}